import React from 'react'
import {BaseNodeWidget} from "../base/BaseNodeWidget"
import {PolygonUtil} from "../../../util/PolygonUtil"
import {FlowConst} from "../../../Const";

export class StartNodeWidget extends BaseNodeWidget {
    static defaultProps = {
        text: "Start",
        size: FlowConst.DEFAULT_HALF_COMPONENT_SIZE,
        color: '#4dbd74',
    };

    constructor (props) {
        super(props)
    }

    createShape (props) {
        const polygonProps = {
            size : props.size,
            color : props.color,
            strokeWidth : props.strokeWidth,
            stroke :props.stroke,
        }
        return PolygonUtil.createCircle(polygonProps)
    };
}

export const StartNodeWidgetFactory = React.createFactory(StartNodeWidget)
